//
//  Weather.m
//  
//
//  Created by Lawrence on 15/9/23.
//
//

#import "Weather.h"

@implementation Weather
//初始化天气对象
-(instancetype)initWeather:(NSDictionary *)weatherinfo{
    Weather *weather=[[Weather alloc] init];
    [weather initWithDict:weatherinfo];
    return weather;
}
//为各个属性成员赋值
-(void) initWithDict:(NSDictionary *)weatherinfo{
    _city=[weatherinfo objectForKey:@"city"];
    _cityid=[weatherinfo objectForKey:@"cityid"];
    _temp1=[weatherinfo objectForKey:@"temp1"];
    _temp2=[weatherinfo objectForKey:@"temp2"];
    _img1=[weatherinfo objectForKey:@"img1"];
    _img2=[weatherinfo objectForKey:@"img2"];
    _ptime=[weatherinfo objectForKey:@"ptime"];
    _weather=[weatherinfo objectForKey:@"weather"];
}
@end
